home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / lib.fmt / c / getenv.man < prev    next >
Encoding:
Text File  |  1990-08-30  |  1.6 KB  |  67 lines

  1.  
  2.  
  3.  
  4. GETENV                C Library Procedures                 GETENV
  5.  
  6.  
  7.  
  8. NNAAMMEE
  9.      getenv, setenv, unsetenv - manipulate environmental vari-
  10.      ables
  11.  
  12. SSYYNNOOPPSSIISS
  13.      cchhaarr **ggeetteennvv((nnaammee))
  14.      cchhaarr **nnaammee;;
  15.  
  16.      vvooiidd sseetteennvv((nnaammee,, vvaalluuee))
  17.      cchhaarr **nnaammee,, **vvaalluuee;;
  18.  
  19.      vvooiidd uunnsseetteennvv((nnaammee))
  20.      cchhaarr **nnaammee;;
  21.  
  22. DDEESSCCRRIIPPTTIIOONN
  23.      _G_e_t_e_n_v searches the environment list (see _e_n_v_i_r_o_n(7)) for a
  24.      string of the form _n_a_m_e==_v_a_l_u_e and returns a pointer to the
  25.      string _v_a_l_u_e if such a string is present, and 0 (NULL) if it
  26.      is not.
  27.  
  28.      _S_e_t_e_n_v searches the environment list as _g_e_t_e_n_v does; if the
  29.      string _n_a_m_e is not found, a string of the form _n_a_m_e==_v_a_l_u_e is
  30.      added to the environment.  If it is found, its value is
  31.      changed to _v_a_l_u_e.
  32.  
  33.      _U_n_s_e_t_e_n_v removes all occurrences of the string _n_a_m_e from the
  34.      environment.  There is no library provision for completely
  35.      removing the current environment.  It is suggested that the
  36.      following code be used to do so.
  37.  
  38.           static char    *envinit[1];
  39.           extern char    **environ;
  40.           environ = envinit;
  41.  
  42. SSEEEE AALLSSOO
  43.      csh(1), sh(1), execve(2), environ(7)
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. Sprite v1.0              March 20, 1987                         1
  64.  
  65.  
  66.  
  67.